package com.itboye.ihomebank.presenter;

import com.itboye.ihomebank.base.BasePresenter;
import com.itboye.ihomebank.base.ICompleteListener;
import com.itboye.ihomebank.base.MyApplcation;
import com.itboye.ihomebank.bean.PersonDataBean;
import com.itboye.ihomebank.bean.ResultEntity;
import com.itboye.ihomebank.constants.SPContants;
import com.itboye.ihomebank.interfaces.IUserInterface;
import com.itboye.ihomebank.responsitory.UserRepository;
import com.itboye.ihomebank.util.SPUtils;

import java.util.Observer;

/***
 * 
 * @author 递增给Responsitory
 * 
 */
public class UserPresenter extends BasePresenter implements
		IUserInterface<PersonDataBean> {

	// 支付生成订单
	public static final String payHouse_success = "_PayHouse_success";
	public static final String payHouse_fail = "_PayHouse_fail";

	// 查看我的余额
	public static final String wallet_success = "_Wallet_success";
	public static final String wallet_fail = "_Wallet_fail";
	// 修改支付密码
	public static final String updatewallet_success = "_updateWallet_success";
	public static final String updatewallet_fail = "_updateWallet_fail";
	// 验证支付密码
	public static final String checkwallet_success = "_checkWallet_success";
	public static final String checkwallet_fail = "_checkWallet_fail";
	// 绑定银行卡
	public static final String bindwallet_success = "_bindWallet_success";
	public static final String bindwallet_fail = "_bindWallet_fail";
	// 获取已经绑定的银行卡列表
	public static final String bindCardList_success = "_bindCardList_success";
	public static final String bindCardList_fail = "_bindCardList_fail";
	public static final String unbindCardList_success = "_unbindCardList_success";
	public static final String unbindCardList_fail = "_unbindCardList_fail";
	public static final String tixian_success = "_tixian_success";
	public static final String tixian_fail = "_tixian_fail";
	public static final String getConfig_success = "_getConfig_success";
	public static final String getConfig_fail = "_getConfig_fail";
	// 融丰
	public static final String rfpayyuzhifu_success = "_rfpayyuzhifu_success";
	public static final String rfpayyuzhifu_fail = "_rfpayyuzhifu_fail";

	public static final String rongfeng_success = "_rongfeng_success";
	public static final String rongfeng_fail = "_rongfeng_fail";

	// 轮播
	public static final String lunbo_success = "_lunbo_success";
	public static final String lunbo_fail = "_lunbo_fail";
	public static final String yzrf_fail = "_yzrf_fail";
	public static final String yzrf_success = "_yzrf_success";
	public static final String yzyue_success = "_yzyue_success";
	public static final String yzyue_fail = "_yzyue_fail";
	public static final String zoushi_fail = "_zoushi_fail";
	public static final String zoushi_success = "_zoushi_success";
	public static final String persondata_fail = "_persondata_fail";
	public static final String persondata_success = "_persondata_success";
	public static final String safetyPay_success="BY_Pay_paPay_Success";
	public static final String safetyPay_fail="BY_Pay_paPay_Fail";

	public UserPresenter(Observer observer) {
		super(observer);
	}

	// 用户登录
	public static final String user_success = UserPresenter.class.getName()
			+ "_User_success";// 由此判断请求的接口
	public static final String user_fail = UserPresenter.class.getName()
			+ "_User_fail";

	// 发送验证码
	public static final String send_success = UserPresenter.class.getName()
			+ "_Send_success";// 由此判断请求的接口
	public static final String send_fail = UserPresenter.class.getName()
			+ "_Send_fail";

	// 验证验证码
	public static final String verification_success = UserPresenter.class
			.getName() + "_Verification_success";// 由此判断请求的接口
	public static final String verification_fail = UserPresenter.class
			.getName() + "_Verification_fail";
	// 注册
	public static final String register_success = UserPresenter.class.getName()
			+ "_Rregister_success";// 由此判断请求的接口
	public static final String register_fail = UserPresenter.class.getName()
			+ "_Register_fail";

	// 手机找回密码
	public static final String backPass_success = UserPresenter.class.getName()
			+ "_BackPass_success";// 由此判断请求的接口
	public static final String backPass_fail = UserPresenter.class.getName()
			+ "_BackPass_fail";

	// 支付密码
	public static final String zhiFuPass_success = UserPresenter.class
			.getName() + "_zhiFuPass_success";
	public static final String zhiFuPass_fail = UserPresenter.class.getName()
			+ "_zhiFuPass_fail";
	// 验证支付密码
	public static final String zhiFuPassYanZheng_success = UserPresenter.class
			.getName() + "_zhiFuPassYanZheng_success";
	public static final String zhiFuPassYanZheng_fail = UserPresenter.class
			.getName() + "_zhiFuPassYanZheng_fail";

	// 修改用户信息
	public static final String updateUser_success = UserPresenter.class
			.getName() + "_UpdateUser_success";//
	public static final String updateUser_fail = UserPresenter.class.getName()
			+ "_UpdateUser_fail";
	// 修改性别
	public static final String updateSex_success = UserPresenter.class
			.getName() + "_UpdateSex_success";// 由此判断请求的接口
	public static final String updateSex_fail = UserPresenter.class.getName()
			+ "_UpdateSex_fail";
	// 修改昵称
	public static final String updateNickname_success = UserPresenter.class
			.getName() + "_UpdateNickname_success";// 由此判断请求的接口
	public static final String updateNickname_fail = UserPresenter.class
			.getName() + "_UpdateNickname_fail";
	// 修改昵称
	public static final String updateHead_success = UserPresenter.class
			.getName() + "_UpdateHead_success";// 由此判断请求的接口
	public static final String updateHead_fail = UserPresenter.class.getName()
			+ "_UpdateHead_fail";
	// 绑定手机换绑定
	public static final String updateorbindphone_success = UserPresenter.class
			.getName() + "_Updateorbindphone_success";// 由此判断请求的接口
	public static final String updateorbindphone_fail = UserPresenter.class
			.getName() + "_Updateorbindphone_fail";

	// 更改密码
	public static final String updatepwdbypwd_success = UserPresenter.class
			.getName() + "_Updatepwdbypwd_success";// 由此判断请求的接口
	public static final String updatepwdbypwd_fail = UserPresenter.class
			.getName() + "_Updatepwdbypwd_fail";
	// 手机找密
	public static final String updatepwdbyphone_success = UserPresenter.class
			.getName() + "_Updateorbindphone_success";// 由此判断请求的接口
	public static final String updatepwdbyphone_fail = UserPresenter.class
			.getName() + "_Updateorbindphone_fail";
	// 获取系统消息
	public static final String systemmessage_success = UserPresenter.class
			.getName() + "_Updateorbindphone_success";// 由此判断请求的接口
	public static final String systemmessage_fail = UserPresenter.class
			.getName() + "_Updateorbindphone_fail";

	// 获取方向
	public static final String getOritation_success = UserPresenter.class
			.getName() + "_GetOritation_success";// 由此判断请求的接口
	public static final String getOritation_fail = UserPresenter.class
			.getName() + "_GetOritation_fail";

	// 房源发布
	public static final String houseAdd_success = UserPresenter.class.getName()
			+ "_HouseAdd_success";// 由此判断请求的接口
	public static final String houseAdd_fail = UserPresenter.class.getName()
			+ "_HouseAdd_fail";

	// 实名认证
	public static final String realName_success = UserPresenter.class.getName()
			+ "_RealName_success";// 由此判断请求的接口
	public static final String realName_fail = UserPresenter.class.getName()
			+ "_RealName_fail";

	// 消息分页查询
	public static final String sysMess_success = UserPresenter.class.getName()
			+ "_SysMess_success";// 由此判断请求的接口
	public static final String sysMess_fail = UserPresenter.class.getName()
			+ "_SysMess_fail";

	// 修改钥匙信息
	public static final String updateKey_success = UserPresenter.class
			.getName() + "_UpdateKey_success";// 由此判断请求的接口
	public static final String updateKey_fail = UserPresenter.class.getName()
			+ "_UpdateKey_fail";

	// 查询钥匙
	public static final String myKey_success = UserPresenter.class.getName()
			+ "_MyKey_success";// 由此判断请求的接口
	public static final String myKey_fail = UserPresenter.class.getName()
			+ "_MyKey_fail";
	// 绑定科技侠
	public static final String bindKeJiXia_success = "_BindKeJiXia_success";
	public static final String bindKeJiXia_fail = "_BindKeJiXia_fail";

	// 获取合同参数
	public static final String heTongParams_success = "_HeTongParams_success";
	public static final String heTongParams_fail = "_HeTongParams_fail";

	// 提交合同
	public static final String heTongTiJiao_success = "_HeTongTiJiao_success";
	public static final String heTongTiJiao_fail = "_HeTongTiJiao_fail";

	// 确认合同
	public static final String queRenHeTong_success = "_QueRenHeTong_success";
	public static final String queRenHeTong_fail = "_QueRenHeTong_fail";
	// 签约详情
	public static final String qianyuedetail_success = "_Qianyuedetail_success";
	public static final String qianyuedetail_fail = "_Qianyuedetail_fail";
	// 房源收藏列表
	public static final String myCollection_success = "_MyCollection_success";
	public static final String myCollection_fail = "_MyCollection_fail";

	// 发送钥匙
	public static final String sendKey_success = "_sendKey_success";
	public static final String sendKey_fail = "_sendKey_fail";

	// 房源收藏列表
	public static final String sendPwd_success = "_sendPwd_success";
	public static final String sendPwd_fail = "_sendPwd_fail";

	// 房源收藏列表
	public static final String kaisuoLishi_success = "_kaisuoLishi_success";
	public static final String kaisuoLishi_fail = "_kaisuoLishi_fail";
	// 锁的钥匙列表
	public static final String keyOfLock_success = "_keyOfLock_success";
	public static final String keyOfLock_fail = "_keyOfLock_fail";

	// 键盘密码记录
	public static final String pass_jilu_success = "_pass_jilu_success";
	public static final String pass_jilu_fail = "_pass_jilu_fail";

	// 删除普通钥匙（所有键盘密码失效）
	public static final String delete_jianpan_pass_success = "_delete_jianpan_pass_success";
	public static final String delete_jianpan_pass_fail = "_delete_jianpan_pass_fail";

	// 删除钥匙
	public static final String deleteKey_success = "_deleteKey_success";
	public static final String deleteKey_fail = "_deleteKey_fail";

	// 解除绑定
	public static final String unbindAdmin_success = "_unbindAdmin_success";
	public static final String unbindAdmin_fail = "_unbindAdmin_fail";

	// 下载钥匙
	public static final String down_success = "_down_success";
	public static final String down_fail = "_down_fail";
	// 冻结钥匙
	public static final String lock_success = "_lock_success";
	public static final String lock_fail = "_lock_fail";

	// 解冻钥匙
	public static final String unLock_success = "_unLock_success";
	public static final String unLock_fail = "_unLock_fail";

	// 授权管理员
	public static final String shouquan_success = "_shouquan_success";
	public static final String shouquan_fail = "_shouquan_fail";

	// 上传开锁记录
	public static final String uploadjilu_success = "_uploadjilu_success";
	public static final String uploadjilu_fail = "_uploadjilu_fail";
	// 电量
	public static final String dianliang_success = "_dianliang_success";
	public static final String dianliang_fail = "_dianliang_fail";

	// 获取银行卡类型
	public static final String bankType_success = "_bankType_success";
	public static final String bankType_fail = "_bankType_fail";

	// 获取手机号码对应的用户
	public static final String queryUserByPhone_success = "_queryUserByPhone_success";
	public static final String queryUserByPhone_fail = "_queryUserByPhone_fail";

	public static final String zhuanzhang_success = "_zhuanzhang_success";
	public static final String zhuanzhang_fail = "_zhuanzhang_fail";
	//获取科技侠openid
	public static final String openid_success = "_openid_success";
	public static final String openid_fail = "_openid_fail";
	//确认资产清单
	public static final String qingdan_success = "_qingdan_success";
	public static final String qingdan_fail = "_qingdan_fail";
	//芝麻信用
	public static final String zhima_success = "_zhima_success";
	public static final String zhima_fail = "_zhima_fail";
	//芝麻信用  存入后台
	public static final String zhima_save_success = "_zhima_save_success";
	public static final String zhima_save_fail = "_zhima_save_fail";
	//新设备登录验证
	public static final String devicelogin_success = "_devicelogin_success";
	public static final String devicelogin_fail = "_devicelogin_fail";
	//新设备登录短信验证
	public static final String deviceloginSms_success = "_deviceloginSms_success";
	public static final String deviceloginSms_fail = "_deviceloginSms_fail";

	//租房账单列表
	public static final String rentingBIll_success = "_rentingBIll_success";
	public static final String rentingBIll_fail = "_rentingBIll_fail";
	//经纪人 个人中心
	public static final String agentCenter_success = "_agentCenter_success";
	public static final String agentCenter_fail = "_agentCenter_fail";
	//申请分期
	public static final String applyStage_success = "_applyStage_success";
	public static final String applyStage_fail = "_applyStage_fail";

	//IC卡列表
	public static final String BY_ScienerV3_listIcCards_success = "_BY_ScienerV3_listIcCards_success";
	public static final String BY_ScienerV3_listIcCards_fail = "_BY_ScienerV3_listIcCards_fail";

	//添加ic卡
	public static final String BY_ScienerV3_addIcCard_success = "_BY_ScienerV3_addIcCard_success";
	public static final String BY_ScienerV3_addIcCard_fail = "_BY_ScienerV3_addIcCard_fail";

	//删除ic卡
	public static final String BY_ScienerV3_delIcCard_success = "_BY_ScienerV3_delIcCard_success";
	public static final String BY_ScienerV3_delIcCard_fail = "_BY_ScienerV3_delIcCard_fail";

	//清空ic卡列表
	public static final String BY_ScienerV3_clearIcCard_success = "_BY_ScienerV3_clearIcCard_success";
	public static final String BY_ScienerV3_clearIcCard_fail = "_BY_ScienerV3_clearIcCard_fail";

	//改变管理员
	public static final String BY_Sciener2_changeAdmin_success = "_BY_Sciener2_changeAdmin_success";
	public static final String BY_Sciener2_changeAdmin_fail = "_BY_Sciener2_changeAdmin_fail";

	//获取sid
	public static final String By_GETSID_success = "_By_GETSID_success";
	public static final String By_GETSID_fail = "_By_GETSID_fail";

	@Override
	public void getSid(String userName, String pwd) {

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(By_GETSID_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(By_GETSID_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getSid(userName, pwd);
	}

	@Override
	public void login(String userName, String pwd) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(user_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(user_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.login(userName, pwd);
	}

	/**
	 * 发送短信
	 */
	@Override
	public void send(String phone, String code) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {
					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(send_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(send_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.send(phone, code);
	}

	/**
	 * 验证验证码
	 */
	@Override
	public void verification(String mobile, String code_type, String code) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {
					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(verification_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(verification_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.verification(mobile, code_type, code);

	}

	/**
	 * 注册
	 */
	@Override
	public void register(String reg_type, String from, String code,
			String username, String password) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(register_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(register_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.register(reg_type, from, code, username, password);

	}

	/**
	 * 手机找回密码
	 */
	@Override
	public void backPass(String mobile, String code, String psw) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(backPass_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(backPass_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.backPass(mobile, code, psw);

	}
	/**
	 * 手机找回密码
	 */
	@Override
	public void backPass(String mobile, String psw) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(backPass_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(backPass_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.backPass(mobile, psw);

	}

	@Override
	public void updateInfo(String uid, String realname, String email, String birthday, String nickname, String sex, String qq, String sign) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateUser_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateUser_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateInfo(uid, realname, email, birthday, nickname, sex, qq, sign);
	}

	/**
	 * 修改性别
	 */
	@Override
	public void updateSex(String uid, String sex) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateSex_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateSex_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateSex(uid, sex);

	}

	/**
	 * 修改昵称
	 */
	@Override
	public void updateNickname(String uid, String nickname) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateNickname_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateNickname_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateNickname(uid, nickname);

	}

	/**
	 * 修改头像
	 */
	@Override
	public void updateHead(String uid, String type, String image) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateHead_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateHead_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateHead(uid, type, image);

	}

	@Override
	public void getConfig() {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(getConfig_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(getConfig_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getConfig();
	}

	@Override
	public void bindPhone(String uid, String phone, String code,
			String password, boolean isChange) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateorbindphone_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(updateorbindphone_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.bindPhone(uid, phone, code, password, isChange);
	}

	@Override
	public void updatePwdByPwd(String uid, String oldPassword,
			String newPassword) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updatepwdbypwd_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updatepwdbypwd_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updatePwdByPwd(uid, oldPassword, newPassword);
	}

	@Override
	public void updatePwdByPhone(String uid, String mobile, String code,
			String newPassword) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updatepwdbyphone_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(updatepwdbyphone_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updatePwdByPhone(uid, mobile, code, newPassword);
	}

	@Override
	public void systemMessage(String uid, String msgType) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(systemmessage_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(systemmessage_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.systemMessage(uid, msgType);
	}

	@Override
	public void getDirection() {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(getOritation_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(getOritation_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getDirection();
	}

	/**
	 * 房源发布
	 */
	public void getHouseAdd(String uid, String imgs, String community_code,
			int rent_type, String contact_name, String contact_phone,
			String rent, String size, String unit, String house_floor,
			String floors, String house_decoration, String house_pay,
			String house_dir, String address, String entrust_money,
			String house_feature, String house_device, String addressdetail,String house_no,String deposit,String abstracts,String title) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(houseAdd_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(houseAdd_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getHouseAdd(uid, imgs, community_code, rent_type, contact_name,
				contact_phone, rent, size, unit, house_floor, floors,
				house_decoration, house_pay, house_dir, address, entrust_money,
				house_feature, house_device, addressdetail,house_no,deposit,abstracts,title);

	}

	/**
	 * 实名认证
	 */
	public void getRealName(String uid, String realname, String idnumber,
			String bank_no, String bank_phone, String code) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(realName_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Error);
						result.setEventType(realName_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getRealName(uid, realname, idnumber, bank_no, bank_phone, code);
	}

	/**
	 * 消息分页查询
	 */
	@Override
	public void getSystemMess(String uid, String msg_type, String page_no,
			String page_size) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sysMess_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sysMess_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getSystemMess(uid, msg_type, page_no, page_size);
	}

	@Override
	public void bindKeJiXia(String uid, boolean isBind) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindKeJiXia_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindKeJiXia_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.bindKeJiXia(uid, isBind);
	}

	@Override
	public void myKey(String uid,String kword) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(myKey_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(myKey_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.myKey(uid,kword);
	}

	@Override
	public void updateKey(String uid, String lockId, String alias) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateKey_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updateKey_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateKey(uid, lockId, alias);
	}

	@Override
	public void heTongParams(String subject,String contract_no) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(heTongParams_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(heTongParams_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.heTongParams(subject,contract_no);
	}

	@Override
	public void tiJiaoHeTong(String uid, String contractNo, String params) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(heTongTiJiao_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(heTongTiJiao_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.tiJiaoHeTong(uid, contractNo, params);
	}

	@Override
	public void wanChengHeTong(String uid, String contractNo) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(queRenHeTong_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(queRenHeTong_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.wanChengHeTong(uid, contractNo);
	}

	@Override
	public void qianyueDetail(String uid, String contractNo) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(qianyuedetail_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(qianyuedetail_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.qianyueDetail(uid, contractNo);
	}

	@Override
	public void myCollection(String uid, String status) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(myCollection_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(myCollection_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.myCollection(uid, status);
	}

	@Override
	public void getYWContactName(String uid, String startDate, String endDate) {
		// TODO Auto-generated method stub

	}

	@Override
	public void siLiao(String uid, String toUid, String msg) {
		// TODO Auto-generated method stub

	}

	@Override
	public void getSiXinHistory(String uid, String toUid, String begin,
			String end, String count, String next) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sendKey(String uid, String toUid, String lockId, String start,
			String end, String mark,String send_type) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sendKey_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sendKey_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.sendKey(uid, toUid, lockId, start, end, mark,send_type);
	}

	@Override
	public void sendPwd(String uid, String toUid, String lockId, String start,
			String end) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sendPwd_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(sendPwd_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.sendPwd(uid, toUid, lockId, start, end);

	}

	@Override
	public void keisuojilu(String uid, String lockId, String page,
			String pageSize) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(kaisuoLishi_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(kaisuoLishi_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.keisuojilu(uid, lockId, page, pageSize);

	}

	@Override
	public void keyOfLock(String uid, String lockId) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(keyOfLock_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(keyOfLock_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.keyOfLock(uid, lockId);
	}

	@Override
	public void passJiLu(String uid, String lock_id, String current_page, String per_page) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(pass_jilu_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(pass_jilu_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.passJiLu(uid, lock_id,current_page,per_page);
	}

	@Override
	public void chongZhi(String uid, String lock_id) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {
					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(delete_jianpan_pass_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(delete_jianpan_pass_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.chongZhi(uid, lock_id);
	}

	@Override
	public void deleteKey(String uid, String toUid, String keyId, String lockId) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(deleteKey_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(deleteKey_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.deleteKey(uid, toUid, keyId, lockId);
	}

	@Override
	public void unbindLock(String uid, String lockId, String key_id,String auth_out) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(unbindAdmin_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(unbindAdmin_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.unbindLock(uid, lockId,key_id,auth_out);
	}

	@Override
	public void downLoadKey(String uid, String keyId, String lockId) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(down_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(down_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.downLoadKey(uid, keyId, lockId);
	}

	@Override
	public void lockKey(String uid, String toUid, String keyId, String lockId,
			final int type) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						if (type == 1) {
							result.setEventType(lock_success);
						} else {
							result.setEventType(unLock_success);
						}
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						if (type == 1) {
							result.setEventType(lock_fail);
						} else {
							result.setEventType(unLock_fail);
						}

						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.lockKey(uid, toUid, keyId, lockId, type);
	}

	/**
	 * 修改支付密码
	 */
	@Override
	public void updataZhiFu(String uid, String old_psw, String new_psw) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhiFuPass_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhiFuPass_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updataZhiFu(uid, old_psw, new_psw);

	}

	/**
	 * 验证支付密码
	 */
	@Override
	public void ZhiFuPassYanZheng(String uid, String psw) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhiFuPassYanZheng_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhiFuPassYanZheng_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.ZhiFuPassYanZheng(uid, psw);
	}

	/**
	 * 验证支付密码
	 */
	@Override
	public void shouquan(String uid, String toUid, String lockId, String keyId,
			String startDate, String endDate) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(shouquan_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(shouquan_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.shouquan(uid, toUid, lockId, keyId, startDate, endDate);
	}

	@Override
	public void uploadHistoryOfUnlock(String uid, String lockId,String records, String success,long unlock_time,int power) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {
					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(uploadjilu_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(uploadjilu_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.uploadHistoryOfUnlock(uid, lockId, records, success,unlock_time,power);
	}

	@Override
	public void updateDianLiang(String uid, String lock_id, String power) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(dianliang_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(dianliang_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateDianLiang(uid, lock_id,power);
	}

	@Override
	public void payHouse(String uid, String pay_code_type, String items,
			String pay_type, String wallet_pay_money, String money,
			String wallet_only) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(payHouse_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(payHouse_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.payHouse(uid, pay_code_type, items, pay_type, wallet_pay_money,
				money, wallet_only);
	}

	@Override
	public void myWallet(String uid) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(wallet_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(wallet_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.myWallet(uid);
	}

	@Override
	public void updateWalletPsw(String uid, String oldPsw, String newPsw) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updatewallet_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(updatewallet_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.updateWalletPsw(uid, oldPsw, newPsw);
	}

	@Override
	public void yzWalletPsw(String uid, String psw) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(checkwallet_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(checkwallet_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.yzWalletPsw(uid, psw);
	}

	@Override
	public void bindBankCard(String uid, String bank_no, String bank_account,
			String bank_cert, String bank_phone, String bank_cvv,
			String bank_yxq,String bank_deposit) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindwallet_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindwallet_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.bindBankCard(uid, bank_no, bank_account, bank_cert, bank_phone,
				bank_cvv, bank_yxq,bank_deposit);
	}

	@Override
	public void getBankType(String bankNo) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bankType_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bankType_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}
				});
		user.getBankType(bankNo);
	}

	@Override
	public void bankList(String uid) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindCardList_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(bindCardList_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.bankList(uid);
	}

	public void unbindBankCard(String uid, String bankNo) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(unbindCardList_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(unbindCardList_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.unbindBankCard(uid, bankNo);
	}

	public void tixian(String uid, String money, String cardNo) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(tixian_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(tixian_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.tixian(uid, money, cardNo);
	}

	public void rfPay(String uid, String pay_code, String bank_id) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rfpayyuzhifu_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rfpayyuzhifu_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.rfPay(uid, pay_code, bank_id);
	}

	@Override
	public void rongfengPay(String uid, String pay_code, String bank_id) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rongfeng_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rongfeng_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.rongfengPay(uid,pay_code,bank_id);
	}

	@Override
	public void lunbo(String position) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(lunbo_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(lunbo_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.lunbo(position);
	}

	public void sendRf(Object orderCode, String code) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(yzrf_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(yzrf_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.sendRf(orderCode, code);
	}

	public void yueYanzheng(String uid, String password) {
		// TODO Auto-generated method stub

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(yzyue_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(yzyue_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.yueYanzheng(uid, password);
	}

	@Override
	public void safety(String uid, String pay_code, String bank_id) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(safetyPay_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(safetyPay_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.safety(uid, pay_code,bank_id);
	}

	public void zoushi(String community_id, String chart_type, String which,
			String house_room) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zoushi_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zoushi_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.zoushi(community_id, chart_type, which, house_room);
	}

	public void queryUserByPhone(String phone) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(queryUserByPhone_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(queryUserByPhone_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.queryUserByPhone(phone);
	}

	public void zhuanzhang(String uid, String to_account, String balance,String contractNo,
			String trans_type) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhuanzhang_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhuanzhang_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.zhuanzhang(uid, to_account, balance,contractNo, trans_type);
	}

	public void getPersonData(String uid) {
		// TODO Auto-generated method stub
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(persondata_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(persondata_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.getPersonData(uid);
	}

	@Override
	public void getOpenId(String uid) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(openid_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(openid_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.getOpenId(uid);
	}

	@Override
	public void querenZichan(String uid, String contract_no,String dissent) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(qingdan_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(qingdan_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.querenZichan(uid,contract_no,dissent);
	}

	@Override
	public void zhiMa(String uid) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhima_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhima_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.zhiMa(uid);
	}

	@Override
	public void zhiMaChaXun(String uid, String biz_no) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhima_save_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(zhima_save_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.zhiMaChaXun(uid,biz_no);
	}

	@Override
	public void loginByNewDevice(String uid, String device_token, String device_name) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(devicelogin_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(devicelogin_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.loginByNewDevice(uid,device_token,device_name);
	}

	@Override
	public void verifyBySms(String mobile, String code) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(deviceloginSms_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(deviceloginSms_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.verifyBySms(mobile,code);
	}

	@Override
	public void rentingBill(String uid, int per_page, int current_page) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rentingBIll_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(rentingBIll_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.rentingBill(uid,per_page,current_page);
	}

	@Override
	public void agentCenter(String uid) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(agentCenter_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(agentCenter_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.agentCenter(uid);
	}

	@Override
	public void applyStage(String uid, String contract_no) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(applyStage_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(applyStage_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.applyStage(uid,contract_no);
	}

	@Override
	public void icCardList(String uid, String lock_id, String page, String size,String remote) {

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_listIcCards_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_listIcCards_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.icCardList(uid, lock_id, page, size,remote);
	}

	@Override
	public void addIcCard(String uid, String lock_id, String card_no,String card_name,String start,String end) {

		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_addIcCard_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_addIcCard_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.addIcCard(uid, lock_id, card_no,card_name,start,end);
	}

	@Override
	public void deleteIcCard(String uid, String lock_id, String cardId) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_delIcCard_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_delIcCard_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.deleteIcCard(uid, lock_id, cardId);


	}

	@Override
	public void clearIcCardList(String uid, String lock_id) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_clearIcCard_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_ScienerV3_clearIcCard_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.clearIcCardList(uid, lock_id);
	}

	@Override
	public void changeAdministrator(String uid, String lock_id, String to_mobile) {
		IUserInterface<PersonDataBean> user = new UserRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_Sciener2_changeAdmin_success);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);

					}

					@Override
					public void failure(ResultEntity result) {
						result.setEventTag(Tag_Success);
						result.setEventType(BY_Sciener2_changeAdmin_fail);
						UserPresenter.this.setChanged();
						UserPresenter.this.notifyObservers(result);
					}
				});
		user.changeAdministrator(uid, lock_id,to_mobile);
	}
}
